import request from '@/router/axios'; // 考核标准

// 树数据
export const getTree = () => {
  return request({
    url: '/api/hg-quality/supplierchecktarget/list',
    method: 'get'
  })
}

// 列表
export const getList = (current, size, params) => {
  return request({
    url: '/api/hg-quality/suppliercheckstandard/page',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}

// 删除
export const remove = (ids) => {
  return request({
    url: '/api/hg-quality/suppliercheckstandard/remove',
    method: 'post',
    params: {
      ids
    }
  })
}
// 新增-编辑
export const submit = (data, type) => {
  return request({
    url: `/api/hg-quality/suppliercheckstandard/${type}`,
    method: "post",
    data: data
  });
};

// 详情
export const detail = id => {
  return request({
    url: `/api/hg-quality/suppliercheckstandard/detail`,
    method: "get",
    params: {
      id
    }
  });
};

